﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(LevelEditorConst.Level + "/" + LevelEditorConst.Trigger + "/" + LevelEditorConst.EnterOrLeaveArea, typeof(LevelServiceGraph))]
    public class LevelServiceTriggerNode_EnterOrLeaveArea : LevelServiceTriggerNode
    {
        protected override ServiceTriggerType triggerType => ServiceTriggerType.EnterOrLeaveArea;

        protected override string triggerName => LevelEditorConst.EnterOrLeaveArea;
        [InspectorName("是否进入区域触发"), Tooltip("否为离开触发")]
        public bool isRequireEnter;

        protected override LevelServiceCustomConfig CreateConfig()
        {
            return new LevelServiceTriggerCustom_EnterOrLeaveArea()
            {
                isRequireEnter = this.isRequireEnter
            };
        }
    }
}